﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication2.Models.DatMuaModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    DatMua
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div class='Khung'>Đặt mua sản phẩm</div> <br />
    <div class="DangKyNoiDung">
    <img alt="HinhAnh" src='<%=Url.Content("~/Content/Images/"+Model.SanPham.HinhAnh) %>' />
    <%using (Html.BeginForm())
      { %>
        <div class="error"><%=Html.DisplayFor(r=>r.Error) %></div><br/>
        <table cellpadding="0" cellspacing="0" width="100%" style="border-collapse:collapse">
            <tr>
                <%=Html.HiddenFor(r=>r.SanPham.Id) %>
                <%=Html.HiddenFor(r=>r.SanPham.HinhAnh) %>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.TenSanPham)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.TenSanPham, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.IdLoaiSanPham)%></div>
                </td>
                <td>
                    <%=Html.DropDownListFor(r => r.SanPham.IdLoaiSanPham,new SelectList(Model.LoaiSanPhamList,"Id","TenLoaiSanPham"), new { @class = "DangKyControl",disabled="disabled"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.Gia)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.Gia, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.SoLuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.SoLuong, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.DiemThuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.DiemThuong, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.DiemNhanThuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.DiemNhanThuong, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianBatDauBan)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.ThoiGianBatDauBan, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianKetThucBan)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.ThoiGianKetThucBan, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianBatDauNhanHang)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.ThoiGianBatDauNhanHang, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianKetThucNhanHang)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.ThoiGianKetThucNhanHang, new { @class = "DangKyControl",@readonly="readonly"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SoLuongDat)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SoLuongDat, new { @class = "DangKyControl",id="numeric"})%>
                    <%=Html.ValidationMessageFor(r => r.SoLuongDat, null, new { @class="error"})%>
                </td>                
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.IdDaiLyNhanSanPham)%></div>
                </td>
                <td>
                    <%=Html.DropDownListFor(r => r.IdDaiLyNhanSanPham,new SelectList(Model.DaiLyList,"Id","TenDaiLy"), new { @class = "DangKyControl"})%>
                    <%=Html.ValidationMessageFor(r => r.IdDaiLyNhanSanPham, null, new { @class="error"})%>
                </td>
            </tr>
        </table>
        <br /><br />
        <input type="submit" name="btnDatMua" value="Đặt mua" />
        <input type="reset" name="btnClear" value="Clear" />
    <br />
    <%}%> 
    </div><br />

</asp:Content>
